<?$this->load->view('admin/header');?>
<!-- Content Area -->
<div id="middlepart">
    <!-- Left column -->
    <div id="leftcolumn">
        <h1>Page Management</h1>

        <?=form_open($this->uri->uri_string(), array('name'=>'page_form'));?>

        <?$this->load->view('admin/system_messages');?>

        <div id="container-1">
            <ul>
                <li><a href="#fragment-7"><span>Content</span></a></li>
                <li><a href="#fragment-8"><span>Options</span></a></li>
                <li><a href="#" onclick="document.page_form.submit();"><span>Save This Page</span></a></li>
            </ul>
            <div id="fragment-7">

                <h4>Title</h4>
                <input type="text" class="medium" name="title" value="<?=$this->validation->title;?>" title="Title" />

                <br />

                <h4>Content</h4>
                <textarea name="content" id="page_content" style="width: 95%;"><?=$this->validation->content;?></textarea>

                <br />

                <a class="submit" href="#" onclick="document.page_form.submit();">submit</a> <a class="reset" href="#">cancel</a>

            </div>

            <div id="fragment-8">

                <label>Display Order: </label>
                <input type="text" class="tiniest" name="display_order" value="<?=$this->validation->display_order;?>">

                <br />

                <label>Author: </label>
                <select name="user_id">
                    <?foreach ($this->mdl_users->get_authors() as $author) {?>
                    <option value="<?=$author->user_id;?>" <?if(!$this->validation->user_id AND $author->user_id == $this->session->userdata('user_id') OR ($this->validation->user_id == $author->user_id)) {?>selected<?}?>><?=$author->display_name;?></option>
                    <?}?>
                </select>

                <br />

                <label>Published: </label>
                <input type="checkbox" name="published" value="1" <?if($this->validation->published) {?>checked<?}?>>

                <br />

                <label>Allow Comments: </label>
                <input type="checkbox" name="allow_comments" value="1" <?if($this->validation->allow_comments) {?>checked<?}?>>

            </div>

        </div>

        </form>

        <br />
    </div>
    <!-- Left Column -->

</div>
<!-- Content -->

<?$this->load->view('admin/footer');?>